package com.example.administrator.myleb;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ListView;

import com.example.administrator.myleb.Brother.Content;
import com.example.administrator.myleb.Brother.MyAdapter;

public class MainActivity extends AppCompatActivity {
    private ListView mListView;
    private Content items;
    private MyAdapter myAdapter;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.av);
        getAdapter();
        initView();
    }
    private void getAdapter() {
        myAdapter= Content.MakeAdapter1();}
    private void initView() {
        mListView = (ListView) findViewById(R.id.listview);
        mListView.setAdapter(myAdapter);
    }
    public void onClick(View view){
        switch (view.getId()){
            case R.id.add:
                Intent intent=new Intent(this,A02.class);
                startActivity(intent);
                break;
        } }
}
